package com.linkallcloud.core.face.message;

import java.util.Map;

public abstract class FaceMessage implements IFaceMessage {
    private static final long serialVersionUID = -8652655112962011965L;

    private String versn;// 版本号
    private String appCode;// 应用code
    private Map<String, String> esxtras;// 额外信息

    public FaceMessage() {
        this.versn = "1.0";
    }

    public FaceMessage(String versn) {
        this.versn = versn;
    }

    @Override
    public String getVersn() {
        return versn;
    }

    public void setVersn(String versn) {
        this.versn = versn;
    }

    public String getAppCode() {
        return appCode;
    }

    public void setAppCode(String appCode) {
        this.appCode = appCode;
    }

    public Map<String, String> getEsxtras() {
        return esxtras;
    }

    public void setEsxtras(Map<String, String> esxtras) {
        this.esxtras = esxtras;
    }
    
    public String getExtra(String key) {
        if (this.esxtras.containsKey(key)) {
            return this.esxtras.get(key);
        }
        return null;
    }

}
